Telecommunications systems often include a pair of duplex processors running in synchronous operation. This arrangement provides a redundant system wherein a failure of one of the processors typically results in the other of the processors taking over all processing operations while the faulty processor is taken out of service and replaced.
It is common for systems to depend upon the execution of sizeable programs consisting of a large amount of object code for their operation. The object code is related to both call processing, and to the maintenance of the telecommunications system itself. These programs are usually written in a high-level procedural language which is subsequently compiled into low level executable object code. It is not uncommon for programs such as those related to telecommunications systems to be comprised of several million lines of code which may take teams of programmers years to develop.
In a uniprocessor system or in a synchronous duplex processor system, instructions are executed one at a time, in a sequential manner. However, in such systems, it has been found advantageous to implement a "multitasking" scheme whereby tasks comprising numerous lines of code are executed on a scheduled basis. One task may be swapped out while several others are sequentially swapped in and out before the first one is completed. A task, often termed a "process", may utilize a number of subroutines each made up of a number of lines of code. When a task is swapped in, the processor executes the task for a predetermined amount of time, until a scheduler swaps out that task and swaps in another task. The term swap is used here to mean exchange. Instances do occur however, when a task is reading and writing data to a particular memory location while other tasks require reading access to that same memory location. In such a case it is essential that some exclusionary mechanism be employed to prevent access to memory until the previous task is complete. In an event where it is essential for a particular procedure within a task to complete, or for the task itself to complete, the processor executing that procedure or task may be forced into an uninterruptable state until the procedure or task is complete. This uninterruptable state is frequently achieved by the assertion of a global locking mechanism during which the task being performed has exclusive access to the processor and its associated memory banks while the swapping in of other tasks is temporarily halted. Such a global locking scheme has been found to be adequate for a uniprocessor system since the processor is not held up in a waiting state.
Whenever a uniprocessor data handling system is replaced with a multiprocessor system it is desirable to run code already developed for the uniprocessor system on the multiprocessor system. However, in a multiprocessor system wherein a task is being executed by a first processor while a global lock condition is asserted, other processors are locked out of the shared memory. These other processors have to wait until global lock is de-asserted before memory can be accessed, resulting in the other processors being idle for that period of time. This problem may be solved by the implementation of a mechanism which provides the capability of locking and unlocking discrete portions of the shared memory.
It is therefore an object of the invention to provide a method of managing access to a readable, alterable, shared memory in a multiprocessor based system. It is a further object to provide a method of contention avoidance between processors attempting to access the same memory space.